<template>
  <div>
    <van-tabs>
      <van-tab title="表单数据">
        <div id="SidaochangPage">
          <p class="title">
            <span class="line"></span>
            户主信息
          </p>
          <div class="from">
            <van-field readonly v-model="form.HOUSEAPPLICANT" label="姓名" />
            <van-field readonly v-model="form.APPLYPHONE" label="联系电话" />
            <van-field readonly :value="form.SEX == 3 ? '男' : '女'" label="性别" />
            <van-field readonly v-model="form.BUILDREASON_DICNAME" label="建房理由" />
            <van-field readonly v-model="form.CERTIFICATECODE" label="身份证号码" />
            <van-field readonly v-model="form.PERMANENTADDR" label="家庭地址" />
          </div>
          <p class="title">
            <span class="line"></span>
            建房信息
          </p>
          <div class="from">
            <van-field readonly clickable name="picker" :value="surveyData.APPLYTYPE | inUseName(ENUM.JFLXARR)" label="建房类型" />
            <van-field readonly clickable name="picker" :value="surveyData.YDLX | inUseName(ENUM.YDLXARR)" label="地类" />
            <van-field readonly v-if="surveyData.YDLX == 17" clickable name="picker" :value="surveyData.DL_NYD | inUseName(ENUM.NYDARR)" label="农用地" />
            <van-field readonly v-if="surveyData.DL_NYD == 106" v-model="surveyData.YDLX_NYD_QT" label="其他" />
            <van-field v-model="surveyData.HOMESTEADAREA" label="宅基地面积(m²)" />
            <van-field v-model="surveyData.HOUSEFLOORAREA" label="占地面积(m²)" />
            <van-field readonly v-model="surveyData.BUILDAREA" label="建筑面积(m²)" />
            <van-field readonly v-model="surveyData.BUILDHEIGHT" label="檐口高度(m)" />
            <van-field readonly v-model="cengshu" label="建筑层数(层)" />
            <van-field readonly :value="surveyData.WSCLFS | inUseName(ENUM.WSCLFSARR)" label="污水处理方式" />
            <van-field readonly :value="surveyData.STRUCTURETYPE | inUseName(ENUM.JGLXARR)" label="结构类型" />
            <van-field readonly v-model="surveyData.SPACING" label="日照间距" />
            <van-field readonly v-model="surveyData.EXTERIORCOLOR" label="外墙色彩" />
            <van-field readonly v-model="surveyData.EAST" label="东至" />
            <van-field readonly v-model="surveyData.SOUTH" label="南至" />
            <van-field readonly v-model="surveyData.WEST" label="西至1" />
            <van-field readonly v-model="surveyData.NORTH" label="北至" />
            <van-field v-if="showZDZLQL == '是'" readonly :value="surveyData.XLQLR | inUseName(columns)" label="是否征得相邻权利人同意" />
            <van-field readonly v-model="surveyData.CONSTRUCITONADDRESS" autosize type="textarea" label="地址" />
          </div>
          <p class="title">
            <span class="line"></span>
            图集表
          </p>
          <div class="from">
            <van-field readonly :value="surveyData.TJLX == '158' ? '第三方设计图集' : '通用图集'" label="图集类型" />
            <van-field readonly v-model="surveyData.TJBH" label="图集编号" />
            <van-field readonly v-model="surveyData.TJMC" label="图集名称" />
            <van-field readonly v-model="surveyData.JZFG" label="建筑风格" />
            <van-field readonly v-model="surveyData.DJJC" label="地基基础" />
            <van-field readonly v-model="surveyData.JZCS" label="建筑层数(层)" />
            <van-field readonly v-model="surveyData.JZFG" label="建筑风格" />
          </div>
          <div v-if="pageType === '现场放样' || pageType === '基槽验线' || pageType === '一层立模'">
            <p class="title">
              <span class="line"></span>
              住房施工过程检查记录单
            </p>
            <div class="from">
              <van-field readonly v-model="craftsmanData.XM" label="施工单位(建筑工匠)" />
              <van-field v-model="inspectData.ZDMJ" label="放样宅基地面积(m²)" />
              <van-field v-model="inspectData.JZMJ" label="放样房基占地面积(m²)" />
              <van-field v-model="inspectData.SZGCONE" label="四周高程1(米)" placeholder="请填写四周高程1" />
              <van-field v-model="inspectData.SZGCTWO" label="四周高程2(米)" placeholder="请填写四周高程2" />
              <van-field v-model="inspectData.SZGCTHREE" label="四周高程3(米)" placeholder="请填写四周高程3" />
              <van-field v-model="inspectData.SZGCFOUR" label="四周高程4(米)" placeholder="请填写四周高程4" />
              <van-field v-model="inspectData.GD" label="高度(米)" placeholder="请填写高度" />
              <van-field readonly clickable name="picker" v-model="IFTG" label="申请放样是否通过" placeholder="请选择" @click="showPicker = true" />
              <van-popup v-model="showPicker" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
              </van-popup>
              <van-field v-model="inspectData.JCRY" label="验收人员" placeholder="请填写验收人员" />
              <!--<van-field  v-model="form.PERMANENTADDR" label="检查时间" />-->
              <van-field readonly clickable name="datetimePicker" v-model="inspectData.JCSJ" label="检查时间" placeholder="请选择检查时间" />
              <van-popup v-model="showPickerq" position="bottom">
                <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @cancel="showPickerq = false" @confirm="onConfirmRQ" />
              </van-popup>
              <van-field v-model="inspectData.JCRY" label="验收人员" placeholder="请填写验收人员" />
              <van-field readonly clickable name="picker" v-model="SFQY3" label="是否选择测绘单位" placeholder="请选择" @click="showPicker1 = true" />
              <van-popup v-model="showPicker1" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns1" @confirm="onConfirm2" @cancel="showPicker1 = false" />
              </van-popup>
              <van-field v-model="inspectData.QYDWMC3" label="测绘单位" placeholder="请填写测绘单位" />
              <van-field readonly clickable name="picker" v-model="ZGZT" label="选择整改状态" placeholder="请选择" @click="showPicker2 = true" />
              <van-popup v-model="showPicker2" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns2" @confirm="onConfirm1" @cancel="showPicker2 = false" />
              </van-popup>
              <van-field v-model="inspectData.QTRY" label="参与人员" placeholder="请填写参与人员" />
              <van-field v-model="inspectData.ZGNR" label="整改内容" placeholder="请填写整改内容" />
              <van-field v-model="inspectData.ZGJG" label="整改结果" placeholder="请填写整改结果" />
              <van-field v-model="inspectData.FXWT" label="发现问题及处理意见" placeholder="请填写发现问题及处理意见" />
              <upLoad id="upLoad1" :isReadOnly="false" :ISDelete="false" :rowData="form"  :FJData="file1" :CUNID="form.ROW_GUID"   :SHITUID="'98bcf528966e48ce896a8b3fd02d45d5'" :UpLoadID="'7a3fc061c866434b8475d3775c9ddcea'" />
            </div>
            <!-- <p class="title">
        <span class="line"></span>
        相关材料
      </p>
      <div>
        <van-uploader
          v-model="fileList"
          :before-delete="delectFile"
          :max-size="100 * 1024"
          accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
          :after-read="afterRead"
          :max-count="4"
        />
      </div>-->
          </div>

          <div v-if="pageType === '基槽验线' || pageType === '一层立模'">
            <p class="title">
              <span class="line"></span>
              住房施工过程检查记录单(基槽验线)
            </p>
            <div class="from">
              <van-field v-model="craftsmanData.XM" label="施工单位(建筑工匠)" />
              <van-field v-model="inspectData.ZDMJ" label="验线宅地占地面积(m²)" />
              <van-field v-model="inspectData.JZMJ" label="验线住房基占地面积(m²)" />
              <van-field readonly clickable name="picker" v-model="IFTG" label="基槽验线是否通过" placeholder="请选择" @click="showPicker = true" />
              <van-popup v-model="showPicker" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
              </van-popup>
              <van-field v-model="inspectData.JCRY" label="验收人员" placeholder="请填写验收人员" />
              <van-field readonly clickable name="datetimePicker" v-model="inspectData.JCSJ" label="检查时间" placeholder="请选择检查时间" />
              <van-popup v-model="showPickerq" position="bottom">
                <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @cancel="showPickerq = false" @confirm="onConfirmRQ" />
              </van-popup>
              <van-field v-model="inspectData.JCRY" label="验收人员" placeholder="请填写验收人员" />
              <van-field readonly clickable name="picker" v-model="SFQY3" label="是否选择测绘单位" placeholder="请选择" @click="showPicker1 = true" />
              <van-popup v-model="showPicker1" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns1" @confirm="onConfirm2" @cancel="showPicker1 = false" />
              </van-popup>
              <van-field v-model="inspectData.QYDWMC3" label="测绘单位" placeholder="请填写测绘单位" />
              <van-field readonly clickable name="picker" v-model="ZGZT" label="选择整改状态" placeholder="请选择" @click="showPicker2 = true" />
              <van-popup v-model="showPicker2" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns2" @confirm="onConfirm1" @cancel="showPicker2 = false" />
              </van-popup>
              <van-field v-model="inspectData.QTRY" label="参与人员" placeholder="请填写参与人员" />
              <van-field v-model="inspectData.ZGNR" label="整改内容" placeholder="请填写整改内容" />
              <van-field v-model="inspectData.ZGJG" label="整改结果" placeholder="请填写整改结果" />
              <van-field v-model="inspectData.FXWT" label="发现问题及处理意见" placeholder="请填写发现问题及处理意见" />
              <van-field v-model="inspectData.YXYJ" label="验线意见" placeholder="请填写验线意见" />
              <upLoad
                id="upLoad1"
                :ISDelete="false"
                :isReadOnly="false"
                :rowData="form"
                :FJData="file"
                :CUNID="form.ROW_GUID"
                :SHITUID="'98bcf528966e48ce896a8b3fd02d45d5'"
                :UpLoadID="'7a3fc061c866434b8475d3775c9ddcea'" />
            </div>
            <!-- <p class="title">
        <span class="line"></span>
        相关材料
      </p>
      <div>
        <van-uploader
          v-model="fileList"
          :before-delete="delectFile"
          :max-size="100 * 1024"
          accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
          :after-read="afterRead"
          :max-count="4"
        />
      </div>-->
          </div>

          <div v-if="pageType === '一层立模'">
            <p class="title">
              <span class="line"></span>
              住房施工过程检查记录单(一层立模)
            </p>
            <div>
              <van-field readonly v-model="surveyData.HOMESTEADAREA" label="放样宅基地面积(m²)" />
              <van-field readonly v-model="surveyData.HOMESTEADAREA" label="放样房基占地面积(m²)" />
              <van-field readonly v-model="YXData.ZDMJ" label="验线宅基地面积(m²)" />
              <van-field readonly v-model="YXData.JZMJ" label="验线住房基占地面积(m²)" />
              <van-field readonly clickable name="picker" v-model="IFTG" label="一层立模是否通过" placeholder="请选择" @click="showPicker = true" />
              <van-popup v-model="showPicker" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
              </van-popup>
              <van-field readonly clickable name="datetimePicker" v-model="inspectData.JCSJ" label="检查时间" placeholder="请选择时间" />
              <van-popup v-model="showPickerq" position="bottom">
                <van-datetime-picker type="date" v-model="currentDate" title="选择年月日" @cancel="showPickerq = false" @confirm="onConfirmRQ" />
              </van-popup>
              <van-field v-model="inspectData.JCRY" label="验收人员" placeholder="请填写验收人员" />
              <van-field readonly clickable name="picker" v-model="SFQY3" label="是否选择测绘单位" placeholder="请选择" @click="showPicker1 = true" />
              <van-popup v-model="showPicker1" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns1" @confirm="onConfirm2" @cancel="showPicker1 = false" />
              </van-popup>
              <van-field v-model="inspectData.QYDWMC3" label="测绘单位" placeholder="请填写测绘单位" />
              <van-field readonly clickable name="picker" v-model="ZGZT" label="选择整改状态" placeholder="请选择" @click="showPicker2 = true" />
              <van-popup v-model="showPicker2" position="bottom" get-container="#popup">
                <van-picker value-key="DICNAME" show-toolbar :columns="columns2" @confirm="onConfirm1" @cancel="showPicker2 = false" />
              </van-popup>
              <van-field v-model="inspectData.QTRY" label="参与人员" placeholder="请填写参与人员" />
              <van-field v-model="inspectData.ZGNR" label="整改内容" placeholder="请填写整改内容" />
              <van-field v-model="inspectData.ZGJG" label="整改结果" placeholder="请填写整改结果" />
              <van-field v-model="inspectData.FXWT" label="发现问题及处理意见" placeholder="请填写发现问题及处理意见" />
              <upLoad
                id="upLoad1"
                :ISDelete="false"
                :rowData="form"
                :FJData="file2"
                :isReadOnly="false"
                :CUNID="form.ROW_GUID"
                :SHITUID="'98bcf528966e48ce896a8b3fd02d45d5'"
                :UpLoadID="'7a3fc061c866434b8475d3775c9ddcea'" />
            </div>
            <!-- <p class="title">
        <span class="line"></span>
        相关材料
      </p>-->
            <!-- <div>
        <van-uploader
          v-model="fileList"
          :before-delete="delectFile"
          :max-size="100 * 1024"
          accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
          :after-read="afterRead"
          :max-count="4"
        />
      </div>-->
          </div>

          <div v-if="form.WF_GUID == '{8FAD71FB-7756-4F0A-BEE8-4F6397B075A8}'">
            <p class="title">
              <span class="line"></span>
              批准信息
            </p>
            <div class="from">
              <van-field readonly v-model="form.HOUSEAPPLICANT" label="申请户主" />
              <van-field readonly v-model="form.CERTIFICATECODE" label="身份证号" />
              <van-field v-model="inspectData.XCJSGHXKZH" label="乡村建设规划许可证号" placeholder="请填写乡村建设规划许可证号" />
              <van-field v-model="inspectData.NCZJDPZSH" label="农村宅基地批准书号" placeholder="请填写农村宅基地批准书号" />
              <van-field readonly clickable name="datetimePicker" v-model="inspectData.FYSQSJ" label="开工日期" placeholder="请选择时间" @click="showPickerq1 = true" />
              <van-popup v-model="showPickerq1" position="bottom">
                <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @cancel="showPickerq1 = false" @confirm="onConfirmRQ1" />
              </van-popup>
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'">*</span>
                <van-field
                  readonly
                  clickable
                  name="datetimePicker"
                  v-model="inspectData.JGYSSQSJ"
                  label="竣工日期"
                  :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请选择时间' : ''"
                  @click="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? (showPickerq2 = true) : ''" />
                <van-popup v-model="showPickerq2" position="bottom">
                  <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @cancel="showPickerq2 = false" @confirm="onConfirmRQ2" />
                </van-popup>
              </div>
              <van-field v-model="inspectData.PZZJDMJ" label="批准宅基地面积(m²)" placeholder="请填写批准宅基地面积" />
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}'">*</span>
                <van-field
                  v-model="inspectData.SYZJDMJ"
                  :readonly="form.NODE_GUID !== '{003E7696-65E6-432B-97A7-C95711D1D0E0}'"
                  label="实用宅基地面积(m²)"
                  :placeholder="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}' ? '请填写实用宅基地面积' : ''" />
              </div>
              <van-field v-model="inspectData.PZFJZDMJ" label="批准房基占地面积(m²)" placeholder="请填写批准房基占地面积" />
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}'">*</span>
                <van-field
                  v-model="inspectData.SJFJZDMJ"
                  :readonly="form.NODE_GUID !== '{003E7696-65E6-432B-97A7-C95711D1D0E0}'"
                  label="实用房基占地面积(m²)"
                  :placeholder="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}' ? '请填写实用房基占地面积' : ''" />
              </div>
              <!-- <van-field v-model="inspectData.BUILDSTOREY | inUseName(enums)"  label="批建层数(层)" placeholder="请填写批建层数" /> -->
              <van-field readonly v-model="cengshu" label="批建层数(层)" />
              <!-- <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'">*</span>
                <van-field  clickable name="picker"
                :readonly="form.NODE_GUID !== '{7C289E35-88FC-4002-9B88-ED6F472CA872}'"
                      :value="inspectData.JGCS | inUseName(ENUM.YDLXARR1)" label="竣工层数(层)" :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请填写竣工层数' : ''"
                      @click="ENUM.YDLX1 = true" />
                    <van-popup v-model="ENUM.YDLX1" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.YDLXARR1" value-key="DICNAME"
                        @cancel="ENUM.YDLX1 = false" @confirm="onConfirm11"/>
                    </van-popup>
                 <van-field
                  v-model="inspectData.JGCS"
                  :readonly="form.NODE_GUID !== '{7C289E35-88FC-4002-9B88-ED6F472CA872}'"
                  label="竣工层数(层)"
                  :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请填写竣工层数' : ''" />
              </div> -->
              <div class="inputWrap">
              <span style="color: red" v-if="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'">*</span>
              <van-field  clickable name="picker" :readonly="form.NODE_GUID !== '{7C289E35-88FC-4002-9B88-ED6F472CA872}'"
                      :value="inspectData.JGCS | inUseName(ENUM.YDLXARR1)" label="竣工层数(层)" placeholder="竣工层数(层)"
                      @click="ENUM.YDLX1 = true" />
                    <van-popup v-model="ENUM.YDLX1" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.YDLXARR1" value-key="DICNAME" @confirm="onConfirm11"
                        @cancel="ENUM.YDLX1 = false" />
                    </van-popup>
                    </div>
              <!-- <van-field  clickable name="picker"
                :readonly="form.NODE_GUID !== '{7C289E35-88FC-4002-9B88-ED6F472CA872}'"
                      :value="inspectData.JGCS | inUseName(ENUM.YDLXARR1)" label="竣工层数(层)" :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请填写竣工层数' : ''"
                      @click="ENUM.YDLX1 = true" />
                    <van-popup v-model="ENUM.YDLX1" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.YDLXARR1" value-key="DICNAME"
                        @cancel="ENUM.YDLX1 = false" @confirm="onConfirm11"/>
                    </van-popup> -->
              <van-field v-model="inspectData.PJGD" label="批建高度(米)" placeholder="请填写批建高度" />
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'">*</span>
                <van-field
                  v-model="inspectData.JGGD"
                  :readonly="form.NODE_GUID !== '{7C289E35-88FC-4002-9B88-ED6F472CA872}'"
                  :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请填写竣工高度' : ''"
                  label="竣工高度(米)" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}'">*</span>
                <van-field
                  readonly
                  clickable
                  name="picker"
                  :value="inspectData.CJTH | inUseName(columnsCJ)"
                  label="拆旧退还宅基地情况"
                  :placeholder="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}' ? '请选择' : ''"
                  @click="form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}' ? (showPickerCJ = true) : ''" />
                <van-popup v-model="showPickerCJ" position="bottom" get-container="#popup">
                  <van-picker value-key="DICNAME" show-toolbar :columns="columnsCJ" @confirm="onConfirmCJ" @cancel="showPickerCJ = false" />
                </van-popup>
              </div>
              <van-field v-model="inspectData.JGJZMJ" label="竣工建筑面积(㎡)" placeholder="请填写竣工建筑面积" />
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'">*</span>
                <van-field
                  readonly
                  clickable
                  name="picker"
                  v-model="NW"
                  label="农污"
                  :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请选择' : ''"
                  @click="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? (showPicker = true) : ''" />
                <van-popup v-model="showPicker" position="bottom" get-container="#popup">
                  <van-picker value-key="DICNAME" show-toolbar :columns="columnsNW" @confirm="onConfirmNW" @cancel="showPicker = false" />
                </van-popup>
              </div>
              <div class="inputWrap">
                <span style="color: red" v-if="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'">*</span>
                <van-field
                  readonly
                  clickable
                  name="picker"
                  v-model="NFFM"
                  label="农房风貌"
                  :placeholder="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? '请选择' : ''"
                  @click="form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}' ? (showPickerFM = true) : ''" />
                <van-popup v-model="showPickerFM" position="bottom" get-container="#popup">
                  <van-picker value-key="DICNAME" show-toolbar :columns="columnsFM" @confirm="onConfirmFM" @cancel="showPickerFM = false" />
                </van-popup>
                <!-- form.Rephotos3  宅基地平面位置坐落图  上传base64位的数据-->
                <!-- <p class="title">
                  <span class="line"></span>
                  宅基地平面位置坐落图
                </p>
                <div>
                  <van-uploader
                    v-model="form.Rephotos3"
                    :before-delete="delectFile"
                    accept="image/jpeg, image/png, image/jpg, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, application/pdf"
                    :after-read="afterReadZZD"
                    :max-count="4" />
                </div> -->
              </div>
              <!--<van-field v-model="inspectData.ZJZGYJ" label="镇街资格意见经办人意见" />-->
              <!--<van-field v-model="inspectData.ZJZGSHR" label="镇街资格意见经办人" />-->
            </div>
            <p class="title">
              <span class="line"></span>
              附件
            </p>
            <ul class="tabList">
              <li v-for="(item, index) in list" v-if="item.state" :key="index" @click="fileNode(item)">
                {{ item.name }}
              </li>
            </ul>

            <p class="title" v-if="form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}'">
              <span class="line"></span>
              审核意见
            </p>

            <div v-if="form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}'">
              <van-field readonly v-model="zjshyj.ZJZGYJ" label="镇街资格意见经办人意见" />
              <van-field readonly v-model="zjshyj.ZJZGSHR" label="镇街资格意见经办人" />
              <van-field readonly :value="zjshyj.ZJZGSHSJ | inTime" label="时间" />
              <van-field readonly v-model="zjshyj.ZJZGYJ2" label="镇街资格意见负责人意见" />
              <van-field readonly v-model="zjshyj.ZJZGSHR2" label="镇街资格意见负责人" />
              <van-field readonly :value="zjshyj.ZJZGSHSJ2 | inTime" label="时间" />
              <van-field readonly v-model="zjshyj.ZJGHYJ" label="镇街规划意见经办人意见" />
              <van-field readonly v-model="zjshyj.ZJGHSHR" label="镇街规划意见经办人" />
              <van-field readonly :value="zjshyj.ZJGHSHSJ | inTime" label="时间" />
              <van-field readonly v-model="zjshyj.ZJGHYJ2" label="镇街规划意见负责人意见" />
              <van-field readonly v-model="zjshyj.ZJGHFZR" label="镇街规划意见负责人" />

              <van-field readonly :value="zjshyj.ZJGHSHSJ2 | inTime" label="时间" />
              <van-field readonly v-model="zjshyj.ZJNFYJ" label="镇街农房意见经办人意见" />
              <van-field readonly v-model="zjshyj.ZJNFSHR" label="镇街农房意见经办人" />
              <van-field readonly :value="zjshyj.ZJNFSHSJ | inTime" label="时间" />
              <van-field readonly v-model="zjshyj.ZJNFYJFZR" label="镇街农房意见负责人意见" />
              <van-field readonly v-model="zjshyj.ZJNFFZR" label="镇街农房意见负责人" />
              <van-field readonly :value="zjshyj.ZJNFFZRSJ | inTime" label="时间" />
            </div>
            <p class="title" v-if="form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}'">
              <span class="line"></span>
              镇街验收意见
            </p>
            <div v-if="form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}'">
              <div class="inputWrap">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJYJ" label="镇街意见" />
              </div>
              <div class="inputWrap">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJFZR" label="镇街负责人" />
              </div>
              <div class="inputWrap">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJSJ" label="时间" />
              </div>
            </div>
          </div>
          <div v-if="pageType === '镇街审核'">
            <div v-if="$route.query.name === '资格负责人' || $route.query.name === '资格经办人'">
              <p class="title">
                <span class="line"></span>
                资格审核意见
              </p>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '资格经办人'">*</span>
                <van-field :readonly="$route.query.name !== '资格经办人'" v-model="zjshyj.ZJZGYJ" label="镇街资格意见经办人意见" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '资格经办人'">*</span>
                <van-field :readonly="$route.query.name !== '资格经办人'" v-model="zjshyj.ZJZGSHR" label="镇街资格意见经办人" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '资格经办人'">*</span>
                <template v-if="$route.query.name !== '资格经办人'">
                  <van-field readonly :value="zjshyj.ZJZGSHSJ | inTime" label="时间" />
                </template>
                <template v-else>
                  <van-field v-model="zjshyj.ZJZGSHSJ" label="时间" />
                </template>
              </div>
              <div class="inputWrap" v-if="$route.query.name === '资格负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJZGYJ2" label="镇街资格意见负责人意见" />
              </div>
              <div class="inputWrap" v-if="$route.query.name === '资格负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJZGSHR2" label="镇街资格意见负责人" />
              </div>
              <div class="inputWrap" v-if="$route.query.name === '资格负责人'">
                <span style="color: red">*</span>
                <van-field readonly v-model="zjshyj.ZJZGSHSJ2" label="时间" />
              </div>
            </div>
            <div v-if="$route.query.name === '规划负责人' || $route.query.name === '规划经办人'">
              <p class="title">
                <span class="line"></span>
                规划审核意见
              </p>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '规划经办人'">*</span>
                <van-field :readonly="$route.query.name !== '规划经办人'" v-model="zjshyj.ZJGHYJ" label="镇街规划意见经办人意见" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '规划经办人'">*</span>
                <van-field :readonly="$route.query.name !== '规划经办人'" v-model="zjshyj.ZJGHSHR" label="镇街规划意见经办人" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '规划经办人'">*</span>
                <template v-if="$route.query.name !== '规划经办人'">
                  <van-field readonly :value="zjshyj.ZJGHSHSJ | inTime" label="时间" />
                </template>
                <template v-else>
                  <van-field v-model="zjshyj.ZJGHSHSJ" label="时间" />
                </template>
              </div>
              <div class="inputWrap" v-if="$route.query.name === '规划负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJGHYJ2" label="镇街规划意见负责人意见" />
              </div>
              <div class="inputWrap" v-if="$route.query.name === '规划负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJGHFZR" label="镇街规划意见负责人" />
              </div>
              <div class="inputWrap" v-if="$route.query.name === '规划负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJGHSHSJ2" label="时间" />
              </div>
            </div>
            <div v-if="$route.query.name === '农房负责人' || $route.query.name === '农房经办人'">
              <p class="title">
                <span class="line"></span>
                农房审核意见
              </p>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '农房经办人'">*</span>
                <van-field :readonly="$route.query.name !== '农房经办人'" v-model="zjshyj.ZJNFYJ" label="镇街农房意见经办人意见" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '农房经办人'">*</span>
                <van-field :readonly="$route.query.name !== '农房经办人'" v-model="zjshyj.ZJNFSHR" label="镇街农房意见经办人" />
              </div>
              <div class="inputWrap">
                <span style="color: red" v-show="$route.query.name == '农房经办人'">*</span>
                <template v-if="$route.query.name !== '农房经办人'">
                  <van-field readonly :value="zjshyj.ZJNFSHSJ | inTime" label="时间" />
                </template>
                <template v-else>
                  <van-field v-model="zjshyj.ZJNFSHSJ" label="时间" />
                </template>
              </div>
              <div class="inputWrap" v-if="$route.query.name === '农房负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJNFYJFZR" label="镇街农房意见负责人意见" />
              </div>
              <div class="inputWrap" v-if="$route.query.name === '农房负责人'">
                <span style="color: red">*</span>
                <van-field v-model="zjshyj.ZJNFFZR" label="镇街农房意见负责人" />
              </div>
              <div class="inputWrap" v-if="$route.query.name === '农房负责人'">
                <span style="color: red">*</span>
                <van-field readonly v-model="zjshyj.ZJNFFZRSJ" label="时间" />
              </div>
            </div>
            <!-- <p class="title">
        <span class="line"></span>
        审核意见
      </p>-->
          </div>
          <div class="bottom">
            <van-button style="margin-right: 10px" size="small" type="info" @click="getinsertDataView">提交</van-button>
            <van-button style="margin-right: 10px" size="small" type="info" @click="save()">保存</van-button>
            <van-button size="small" type="info" @click="getDituUrl">地图</van-button>
          </div>
        </div>
      </van-tab>
      <van-tab title="过程数据">
        <FileData :ROW_GUID="form.ROW_GUID" :rowData="form"></FileData>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { dataServerOpenDataView, GetFileData, DelectFile, InsertDataView, updateDataView, FileServerUpload, dataTransFile, QuerySignCallback, FileServerProxy } from '../../../utils/api'
import dd from 'gdt-jsapi'
import FileData from '@/components/activity/FileData'
import { fileToBase64 } from '@/common/FilePare'
import { addDate, GSA_Search } from '@/common/commonApi'
import upLoad from '@/utils/upLoad'
export default {
  name: 'SidaochangPage',
  data() {
    return {
      showZDZLQL: '',
      CJTH: '',
      fileList1: [],
      SFQY3: '',
      IFTG: '',
      NW: '',
      isAddYJ: '',
      NFFM: '',
      userName: '',
      showPickerq2: false,
      YXData: {},
      columns2: [],
      currentDate: new Date(),
      showPickerq1: false,
      pageType: '',
      showPickerq: false,
      fileList: [],
      columns: [],
      columns1: [],
      enums: [],
      showPicker: false,
      form: {},
      craftsmanData: {},
      surveyData: {},
      inspectData: {},
      rowGuid: '',
      groupGuids: '',
      isAdd: true,
      ROW_GUID: '',
      columnsNW: [],
      ZGZT: '',
      columnsCJ: [],
      columnsFM: [],
      showPickerCJ: false,
      showPickerFM: false,
      showPicker1: false,
      showPicker2: false,
      zjshyj: {},
      ENUM: {
        YDLX1: false,
        JFLX: false,
        JFLXARR: [],
        YDLX: false,
        YDLXARR: [],
        JGLX: false,
        JGLXARR: [],
        NYD: false,
        NYDARR: [],
        JFLYARR: [],
        WSCLFS: false,
        WSCLFSARR: [],
        GHFWLX: false,
        GHFWLXARR: [],
        YDLXARR1:[],
      },
      file: [
        {
          title: '照片',
          groupGuid: 'f57c782d-c03a-47cf-a422-a465bb51bdf0',
          FileName: '无',
          fileList: []
        }
      ],
      file2: [
        {
          title: '照片',
          groupGuid: 'f57c782d-c03a-47cf-a422-a465bb51bdf0',
          FileName: '无',
          fileList: []
        }
      ],
      file1: [
        {
          title: '相关材料',
          groupGuid: 'f57c782d-c03a-47cf-a422-a465bb51bdf0',
          FileName: '无',
          fileList: []
        },
        {
          title: '佐证材料',
          groupGuid: '10c0eafd-3647-4f42-844c-d3f445923f47',
          FileName: '无',
          fileList: []
        }
      ],
      list: [
        {
          name: '施工日志',
          path: 'ConstructionLog',
          state: true,
          index: 0
        },
        {
          name: '地基和基础施工质量验收',
          path: 'DJHJCSG',
          state: true
        },
        {
          name: '扣件式钢管脚手架验收',
          path: 'GGJSJ',
          state: true,
          index: 1
        },
        {
          name: '竹脚手架检查验收',
          path: 'ZJSJJCYSB',
          state: true,
          index: 2
        },
        {
          name: '砖砌体结构质量检查和验收',
          path: 'ZQTJGZL',
          state: true,
          index: 3
        },
        {
          name: '现浇混凝土结构质量和验收表',
          path: 'XJHNT',
          state: true,
          index: 4
        },
        {
          name: '结构工程施工质量验收',
          path: 'JGGCSGZLYSB',
          state: true,
          index: 5
        },
        {
          name: '农村宅基地和建房(规划许可)审批表',
          path: 'file',
          state: true,
          index: 6
        }
      ]
    }
  },
  computed: {
    cengshu() {
      var newValues = ''
      this.enums.forEach((item) => {
        if (this.form.BUILDSTOREY == item.DICID) {
          newValues = item.DICNAME
        }
        // debugger
        // if(this.inspectData.BUILDSTOREY==item.DICID){
        //   newValues = item.DICNAME
        // }
      })
      return newValues
    }
  },
  filters: {
    inUseName: function (msg, data) {
      let name = ''
      if (data) {
        data.forEach((item) => {
          if (item.DICID == msg) {
            name = item.DICNAME
          }
        })
      }
      return name
    },
    inTime: function (msg, data) {
      return msg ? msg.split(' ')[0] : ''
    }
  },
  methods: {
   onConfirm11(val){
    debugger
    this.ENUM.YDLX1 = false
    this.inspectData.JGCS = val.DICID
   },
    getIFSILINGYIJIAN: async function () {
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: '313d5ddd-2c1b-4f55-82e1-84d5effd9c47',
          searchObject: JSON.stringify([{ field: 'to_row_guid', value: this.form.ROW_GUID, operator: '=' }]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      let data = JSON.parse(res.data.data).Data
      this.showZDZLQL = data[0].F_IFSILINGYIJIAN_DICNAME
    },
    //获取界面所需字典值
    getEnum: async function (viewID) {
      let _this = this
      // db35edee-88e0-4fae-b14a-868ed4beb1d9   建房类型
      // d2ec96d4-b5bc-404a-a9f1-34db915c694b	用地类型
      // b65d1943-66f4-49b1-b759-cd9f079dc0d3	结构类型

      let token = window.localStorage.getItem('token')
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: viewID,
          searchObject: JSON.stringify([])
          // token: token,
        }
      }
      const res = await QuerySignCallback(params)
      // const res = await dataServerOpenDataView(viewID, [], token)
      switch (viewID) {
        case 'db35edee-88e0-4fae-b14a-868ed4beb1d9':
          this.ENUM.JFLXARR = JSON.parse(res.data.data).Data
          break
        case '52215e71-341a-452b-8823-a8d4aae058ab':
          this.ENUM.NYDARR = JSON.parse(res.data.data).Data
          break
        case 'd2ec96d4-b5bc-404a-a9f1-34db915c694b':
          this.ENUM.YDLXARR = JSON.parse(res.data.data).Data
          break
        case 'b65d1943-66f4-49b1-b759-cd9f079dc0d3':
          this.ENUM.JGLXARR = JSON.parse(res.data.data).Data
          break
        case 'f7f359ad-369c-4bf4-892c-294dceb5edef':
          this.ENUM.WSCLFSARR = JSON.parse(res.data.data).Data
          break
        case 'd47fc1d9-c756-4a46-8259-7e65c82f26ba':
          this.columns1 = JSON.parse(res.data.data).Data
          break
        case '713a5af9-1405-4ba1-9c51-e41d080886f4':
          this.columns2 = JSON.parse(res.data.data).Data
          break
        case 'a892e0f4-5fd6-42b4-b6c2-6e1fc5ebb5dc':
          this.enums = JSON.parse(res.data.data).Data
          this.ENUM.YDLXARR1= JSON.parse(res.data.data).Data
          break
        default:
          break
      }
    },
    FormatTime(value) {
      let d = new Date(value)
      let m = d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : d.getMonth() + 1
      let r = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
      d = d.getFullYear() + '-' + m + '-' + r
      return d
    },
    onConfirmRQ(value) {
      this.inspectData.JCSJ = this.FormatTime(value)
      this.showPickerq = false
    },
    onConfirmRQ1(value) {
      this.inspectData.FYSQSJ = this.FormatTime(value)
      this.showPickerq1 = false
    },
    onConfirmRQ2(value) {
      this.inspectData.JGYSSQSJ = this.FormatTime(value)
      this.showPickerq2 = false
    },
    onConfirm(data) {
      this.IFTG = data.DICNAME
      this.inspectData.IFTG = data.DICID
      this.showPicker = false
    },
    onConfirm1(data) {
      this.ZGZT = data.DICNAME
      this.inspectData.ZGZT = data.DICID
      this.showPicker1 = false
      this.showPicker2=false;
    },
    onConfirm2(data) {
      this.SFQY3 = data.DICNAME
      this.inspectData.SFQY3 = data.DICID
      this.showPicker1=false;
      this.showPicker2 = false
    },
    onConfirmNW(data) {
      this.inspectData.NW = data.DICID
      this.NW = data.DICNAME
      this.showPicker = false
    },
    onConfirmCJ(data) {
      this.CJTH = data.DICNAME
      this.inspectData.CJTH = data.DICID
      this.showPickerCJ = false
    },
    onConfirmFM(data) {
      this.NFFM = data.DICNAME
      this.inspectData.NFFM = data.DICID
      this.showPickerFM = false
    },
    delectFile: async function (file) {
      // if (file.ROW_GUID) {
      //   const res = await DelectFile({
      //     fileGuid: file.ROW_GUID,
      //     token: window.localStorage.getItem('token')
      //   })
      // }
      let fileguid = ''
      if (file.ROW_GUID) {
        fileguid = file.ROW_GUID
      } else {
        fileguid = this.fileGuid
      }
      if (fileguid) {
        let params = {
          accessCode: 'ce9b691634de4ebca68dc5bb638d07f4',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            fileGuid: fileguid,
            token: window.localStorage.getItem('token')
          }
        }
        const res = await FileServerProxy(params)
        let data = JSON.parse(res.data.data).Success
        if (data) {
          this.$toast.success('删除成功!')
        }
        // const res = await DelectFile({
        //   fileGuid: fileguid,
        //   token: window.localStorage.getItem('token')
        // })
      }
    },
    //获取图集信息
    async getTJData() {
      let data = [{ field: 'nf_tripartite.to_row_guid', value: this.form.ROW_GUID }]
      const res = await GSA_Search('dac3c05e-5be5-46dd-b6ab-3b9875058126', data)
      const newobj = Object.assign(res.Data[0], this.surveyData)
      this.surveyData = newobj
      console.log('dfnbue', this.surveyData)
    },
    afterReadZZD(file) {
      this.form.Rephotos3 = fileToBase64(file.file)
    },
    afterRead(file) {
      // 此时可以自行将文件上传至服务器
      this.getFileServerUpload(file.file, 0)
    },
    afterRead1(file) {
      // 此时可以自行将文件上传至服务器
      this.getFileServerUpload(file.file, 1)
    },
    getFileServerUpload: async function (file, data) {
      // let formData = new FormData()
      // formData.append('file', file)
      // formData.append('toRowGuid', this.rowGuid)
      // formData.append('groupGuid', this.groupGuids instanceof Array ? this.groupGuids[data] : this.groupGuids)
      // formData.append('token', window.localStorage.getItem('token'))
      // const res = await FileServerUpload(formData)
      // this.fileGuid = res.data.FileList[0].FILEGUID
      // if (res.data.Success == true) {
      //   this.$toast.success('上传成功!')
      // }

      let params = {
        toRowGuid: this.rowGuid,
        groupGuid: this.groupGuids instanceof Array ? this.groupGuids[data] : this.groupGuids
        // token: window.localStorage.getItem('token')
      }
      let formData = new FormData()
      formData.append('file', file)
      formData.append('accessCode', '7a3fc061c866434b8475d3775c9ddcea')
      formData.append('cityCode', window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000')
      // formData.append('token', window.localStorage.getItem('token'))
      formData.append('paramStr', JSON.stringify(params))
      const res = await dataTransFile(formData)
      let data1 = JSON.parse(res.data.data).FileList
      this.fileGuid = data1[0].FILEGUID
      if (data1[0].FILEGUID) {
        this.$toast.success('上传成功!')
      }
    },
    getData: async function () {
      //   ;
      // 工匠数据
      let dataGuid = '4a9869f7-eb64-4a88-9d67-1e43455d3220'
      let searchObject = JSON.stringify([{ field: 'to_row_guid', value: this.form.ROW_GUID, operator: '=' }])
      let parms = {
        dataGuid: dataGuid,
        searchObject: searchObject
        // token: window.localStorage.getItem('token')
      }
      let params1 = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: parms
      }
      const res = await QuerySignCallback(params1)
      this.craftsmanData = eval('(' + res.data.data + ')').Data[0]
      // 踏勘数据
      let dataGuid1 = 'a0e224e8-36be-4591-b770-30cabda3514a'
      let searchObject1 = JSON.stringify([{ field: 'to_row_guid', value: this.form.ROW_GUID, operator: '=' }])
      let parms11 = {
        dataGuid: dataGuid1,
        searchObject: searchObject1
        // token: window.localStorage.getItem('token')
      }
      let params2 = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: parms11
      }
      const res1 = await QuerySignCallback(params2)
      this.surveyData = eval('(' + res1.data.data + ')').Data[0]
      this.getTJData()
      // ******验线
      let dataGuid3 = '8713519f-bfbe-44b3-88ea-0ab5403c54da'
      let searchObject3 = JSON.stringify([{ field: 'to_row_guid', value: this.form.ROW_GUID, operator: '=' }])
      let parms22 = {
        dataGuid: dataGuid3,
        searchObject: searchObject3
        // token: window.localStorage.getItem('token')
      }
      let params3 = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: parms22
      }
      const res3 = await QuerySignCallback(params3)
      if (eval('(' + res3.data.data + ')').Data.length > 0) {
        this.YXData = eval('(' + res3.data.data + ')').Data[0]
      }
      //住房施工过程检查记录单数据
      let dataGuid2 = '',
        searchObject2 = ''
      //   ;
      switch (this.pageType) {
        case '现场放样':
          dataGuid2 = '145ea3e4-e103-4a4f-a7f7-bb5009ce5cf1'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            { field: 'LX', value: this.pageType, operator: '=' }
          ])

          break
        case '基槽验线':
          dataGuid2 = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            { field: 'LX', value: this.pageType, operator: '=' }
          ])

          break
        case '一层立模':
          dataGuid2 = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            { field: 'LX', value: this.pageType, operator: '=' }
          ])

          break
        case '竣工验收':
          dataGuid2 = '70efd06d-e17c-45bd-ab40-f7283f8bb4ef'
          searchObject2 = JSON.stringify([{ field: 'row_guid', value: this.form.ROW_GUID, operator: '=' }])

          break
        case '镇街审核':
          dataGuid2 = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            {
              field: 'LX',
              value: '竣工验收',
              operator: '='
            }
          ])

          break
      }
      if (this.form.WF_GUID == '{8FAD71FB-7756-4F0A-BEE8-4F6397B075A8}') {
        dataGuid2 = '70efd06d-e17c-45bd-ab40-f7283f8bb4ef'
        searchObject2 = JSON.stringify([{ field: 'row_guid', value: this.form.ROW_GUID, operator: '=' }])
      }
      //   ;
      //获取意见
      if (
        this.form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}' ||
        this.form.NODE_GUID == '{5CC13346-8C53-4A37-989D-932716248754}' ||
        this.form.NODE_GUID == '{EB7D42FE-320C-4A0A-9C98-3E9373898826}' ||
        this.form.NODE_GUID == '{74864380-8590-4F8B-BD75-942E08F04D81}' ||
        this.form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}' ||
        this.form.NODE_GUID == '{B6D1F2A1-ACF3-4894-948E-54B9BC1F059F}' ||
        this.form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}'
      ) {
        let dataGuid2 = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        let searchObject3 = JSON.stringify([{ field: 'to_row_guid', value: this.form.ROW_GUID, operator: '=' }])
        let token = window.localStorage.getItem('token')
        let params = {
          accessCode: '688bd3883572440a859dfd8ba9194e7b',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataguid: dataGuid2,
            searchObject: searchObject3
            // token: token,
          }
        }
        const res5 = await QuerySignCallback(params)

        // const res5 = await dataServerOpenDataView(dataGuid2, searchObject2, window.localStorage.getItem('token'))
        if (JSON.parse(res5.data.data).Data.length > 0) {
          this.isAddYJ = false
          this.zjshyj = JSON.parse(res5.data.data).Data[0]
        } else {
          this.isAddYJ = true
        }
      }
      let paramss = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: dataGuid2,
          searchObject: searchObject2
          // token: token,
        }
      }
      // const res2 = await dataServerOpenDataView(dataGuid2, searchObject2, window.localStorage.getItem('token'))
      const res2 = await QuerySignCallback(paramss)

      // if (res2.data.Data.length > 0) {
      if (JSON.parse(res2.data.data).Data.length > 0) {
        this.isAdd = false

        // this.inspectData = res2.data.Data[0]
        this.inspectData = JSON.parse(res2.data.data).Data[0]
        //this.zjshyj = res2.data.Data[0];
        this.inspectData.FYSQSJ = this.inspectData.FYSQSJ ? this.inspectData.FYSQSJ.split(' ')[0] : ''
        this.inspectData.JGYSSQSJ = this.inspectData.JGYSSQSJ ? this.inspectData.JGYSSQSJ.split(' ')[0] : ''
        this.ROW_GUID = JSON.parse(res2.data.data).Data[0].ROW_GUID
        this.columns.forEach((item, index) => {
          //   ;
          if (item.DICID === this.inspectData.IFTG) {
            this.IFTG = item.DICNAME
          }
        })
        this.columnsNW.forEach((item, index) => {
          if (item.DICID === this.inspectData.NW) {
            this.NW = item.DICNAME
          }
        })
        this.columnsFM.forEach((item, index) => {
          if (item.DICID === this.inspectData.NFFM) {
            this.NFFM = item.DICNAME
          }
        })
        this.columnsCJ.forEach((item, index) => {
          if (item.DICID === this.inspectData.CJTH) {
            this.CJTH = item.DICNAME
          }
        })
      } else {
        this.ROW_GUID = this.newGuid()
        this.isAdd = true
      }
      this.getDate()
      this.getUserName()
    },
    // 枚举数据
    getSelectData: async function () {
      let dataGuid = '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d'
      let searchObject = []
      let token = window.localStorage.getItem('token')
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: dataGuid,
          searchObject: JSON.stringify([])
          // token: token,
        }
      }
      const res = await QuerySignCallback(params)
      // const res = await dataServerOpenDataView(dataGuid, searchObject, token)
      this.columns = JSON.parse(res.data.data).Data
      let dataGuid1 = '98a39a19-ce11-44f4-a27b-2008baf15aec'
      params.params.dataguid = dataGuid1
      const res1 = await QuerySignCallback(params)
      // const res1 = await dataServerOpenDataView(dataGuid1, searchObject, token)
      this.columnsNW = JSON.parse(res1.data.data).Data

      let dataGuid2 = '150503dc-9768-4cc8-9eb8-de9d5d9347ef'
      params.params.dataguid = dataGuid2
      const res2 = await QuerySignCallback(params)
      // const res2 = await dataServerOpenDataView(dataGuid2, searchObject, token)
      this.columnsCJ = JSON.parse(res2.data.data).Data
      let dataGuid3 = '0c099be2-3cea-4af7-b6c7-dbf0d45b39d5'
      params.params.dataguid = dataGuid3
      const res3 = await QuerySignCallback(params)
      // const res3 = await dataServerOpenDataView(dataGuid3, searchObject, token)
      this.columnsFM = JSON.parse(res3.data.data).Data
    },
    //获取相关材料
    getFile: async function () {
      let dataGuid = '',
        searchObject2 = ''
      switch (this.pageType) {
        case '现场放样':
          dataGuid = '145ea3e4-e103-4a4f-a7f7-bb5009ce5cf1'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            { field: 'LX', value: this.pageType, operator: '=' }
          ])

          break
        case '基槽验线':
          dataGuid = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            { field: 'LX', value: this.pageType, operator: '=' }
          ])

          break
        case '一层立模':
          dataGuid = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            },
            { field: 'LX', value: this.pageType, operator: '=' }
          ])

          break
        case '竣工验收':
          dataGuid = '70efd06d-e17c-45bd-ab40-f7283f8bb4ef'
          searchObject2 = JSON.stringify([{ field: 'row_guid', value: this.form.ROW_GUID, operator: '=' }])

          break
        case '镇街审核':
          dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
          searchObject2 = JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.form.ROW_GUID,
              operator: '='
            }
          ])

          break
      }
      let token = window.localStorage.getItem('token')
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: dataGuid,
          searchObject: searchObject2
          // token: token,
        }
      }
      const res = await QuerySignCallback(params)
      // const res = await dataServerOpenDataView(dataGuid, searchObject2, token)
      if (JSON.parse(res.data.data).Data && JSON.parse(res.data.data).Data.length > 0) {
        // if (res.data.Data.length > 0) {
        // this.rowGuid = res.data.Data[0].ROW_GUID
        this.rowGuid = JSON.parse(res.data.data).Data[0].ROW_GUID
        if (this.groupGuids instanceof Array) {
          // const res1 = await GetFileData({
          //   groupGuid: this.groupGuids.join(','),
          //   toRowGuid: this.rowGuid
          // })

          let params = {
            accessCode: '1fdcbce42c6d4748a020feba618d54b8',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
            params: {
              groupGuid: this.groupGuids.join(','),
              toRowGuid: this.rowGuid
            }
          }
          const res1 = await QuerySignCallback(params)
          let data = JSON.parse(res1.data.data).FilesInfo
          if (data.length > 0) {
            // if (JSON.parse(res1.data.data).Data) {
            data.forEach((element) => {
              this.groupGuids.forEach((items, index) => {
                if (element.GROUPGUID == items && index == 0) {
                  element['isImage'] = true
                  this.getFileUrl(element, '1')
                  // element["url"] =
                  //   window.g.BaseURL +
                  //   "FileServer/api/Preview?token=" +
                  //   window.localStorage.getItem("token") +
                  //   "&" +
                  //   "fileGuid=" +
                  //   encodeURIComponent(element.ROW_GUID);
                  //this.fileList.push(element);
                } else if (element.GROUPGUID == items && index == 1) {
                  this.getFileUrl(element, '2')
                  // element["isImage"] = true;
                  // element["url"] =
                  //   window.g.BaseURL +
                  //   "FileServer/api/Preview?token=" +
                  //   window.localStorage.getItem("token") +
                  //   "&" +
                  //   "fileGuid=" +
                  //   encodeURIComponent(element.ROW_GUID);
                  // this.fileList1.push(element);
                }
              })
            })
          }
        } else {
          // const res1 = await GetFileData({
          //   groupGuid: this.groupGuids,
          //   toRowGuid: this.rowGuid
          // })
          let params = {
            accessCode: '1fdcbce42c6d4748a020feba618d54b8',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
            params: {
              groupGuid: this.groupGuids,
              toRowGuid: this.rowGuid
            }
          }
          const res1 = await QuerySignCallback(params)
          let data = JSON.parse(res1.data.data).FilesInfo
          if (data.length > 0) {
            data.FilesInfo.forEach((element) => {
              element['isImage'] = true
              this.getFileUrl(element, '1')
              // element["url"] =
              //   window.g.BaseURL +
              //   "FileServer/api/Preview?token=" +
              //   window.localStorage.getItem("token") +
              //   "&" +
              //   "fileGuid=" +
              //   encodeURIComponent(element.ROW_GUID);
              // this.fileList.push(element);
            })
          }
        }
      }
    },
    //获取附件文件流
    getFileUrl: async function (element, item) {
      let formData = new FormData()
      formData.append('accessCode', '98bcf528966e48ce896a8b3fd02d45d5')
      formData.append('cityCode', window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000')
      formData.append(
        'paramStr',
        JSON.stringify({
          fileGuid: element.ROW_GUID
        })
      )
      let response = await dataTransFilePreview(formData)
      if (response) {
        var img = new Blob([new Int8Array(response.data, 0)], {
          type: response.headers['content-type']
        }) //type类型可自定义
        element['isImage'] = true
        element['url'] = window.URL.createObjectURL(img)
        if (item == '1') {
          this.fileList.push(element)
        } else if (item == '2') {
          this.fileList1.push(element)
        }
      }
    },
    // 提交
    getinsertDataView() {
      //修改地图数据

      this.save('Submit')
    },
    // 保存
    save: async function (type) {
      //   ;
      let data = {},
        dataGuid = ''
      data = this.inspectData
      let status = true
      switch (this.pageType) {
        case '现场放样':
          dataGuid = '145ea3e4-e103-4a4f-a7f7-bb5009ce5cf1'
          data.ROW_GUID = this.ROW_GUID
          data.TO_ROW_GUID = this.form.ROW_GUID
          data.LX = this.pageType
          break
        case '基槽验线':
          dataGuid = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          data.ROW_GUID = this.ROW_GUID
          data.TO_ROW_GUID = this.form.ROW_GUID
          data.LX = this.pageType
          break
        case '一层立模':
          dataGuid = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          data.ROW_GUID = this.ROW_GUID
          data.TO_ROW_GUID = this.form.ROW_GUID
          data.LX = this.pageType
          break
        case '竣工验收':
          dataGuid = '70efd06d-e17c-45bd-ab40-f7283f8bb4ef'
          data.ROW_GUID = this.form.ROW_GUID
          data.TO_ROW_GUID = this.ROW_GUID
          data.LX = this.pageType
          break
        case '镇街审核':
          dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
          data.ROW_GUID = this.ROW_GUID
          data.TO_ROW_GUID = this.form.ROW_GUID
          data.LX = '竣工验收'
          break
      }
      //三个镇街经办人、三个镇街负责人
      if (this.form.NODE_GUID == '{5CC13346-8C53-4A37-989D-932716248754}') {
        //资格经办人
        // ;
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJZGYJ = this.zjshyj.ZJZGYJ
        data.ZJZGSHR = this.zjshyj.ZJZGSHR
        data.ZJZGSHSJ = this.zjshyj.ZJZGSHSJ
        data.LX = '竣工验收'
        if (this.zjshyj.ZJZGYJ && this.zjshyj.ZJZGSHR && this.zjshyj.ZJZGSHSJ) {
        } else {
          status = false
        }
      }
      if (this.form.NODE_GUID == '{EB7D42FE-320C-4A0A-9C98-3E9373898826}') {
        //资格负责人
        // ;
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJZGYJ2 = this.zjshyj.ZJZGYJ2
        data.ZJZGSHR2 = this.zjshyj.ZJZGSHR2
        data.ZJZGSHSJ2 = this.zjshyj.ZJZGSHSJ2
        data.LX = '竣工验收'
        if (this.zjshyj.ZJZGYJ2 && this.zjshyj.ZJZGSHR2 && this.zjshyj.ZJZGSHSJ2) {
        } else {
          status = false
        }
      }
      if (this.form.NODE_GUID == '{74864380-8590-4F8B-BD75-942E08F04D81}') {
        //规划经办人
        // ;
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJGHYJ = this.zjshyj.ZJGHYJ
        data.ZJGHSHR = this.zjshyj.ZJGHSHR
        data.ZJGHSHSJ = this.zjshyj.ZJGHSHSJ
        data.LX = '竣工验收'
        if (this.zjshyj.ZJGHYJ && this.zjshyj.ZJGHSHR && this.zjshyj.ZJGHSHSJ) {
        } else {
          status = false
        }
      }
      if (this.form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}') {
        //规划负责人
        // ;
        if (this.inspectData.SYZJDMJ && this.inspectData.SJFJZDMJ && this.inspectData.CJTH) {
        } else {
          status = false
        }
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJGHYJ2 = this.zjshyj.ZJGHYJ2
        data.ZJFHFZR = this.zjshyj.ZJFHFZR
        data.ZJGHSHSJ2 = this.zjshyj.ZJGHSHSJ2
        data.LX = '竣工验收'
      }
      if (this.form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}') {
        //农房经办人
        // ;
        if (this.inspectData.NW && this.inspectData.NFFM && this.inspectData.JGGD && this.inspectData.JGCS && this.inspectData.JGYSSQSJ) {
        } else {
          status = false
        }
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJNFYJ = this.zjshyj.ZJNFYJ
        data.ZJNFSHR = this.zjshyj.ZJNFSHR
        data.ZJNFSHSJ = this.zjshyj.ZJNFSHSJ
        data.LX = '竣工验收'
      }
      if (this.form.NODE_GUID == '{B6D1F2A1-ACF3-4894-948E-54B9BC1F059F}') {
        //农房负责人
        // ;
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJNFYJ = this.zjshyj.ZJNFYJ
        data.ZJNFFZR = this.zjshyj.ZJNFFZR
        data.ZJNFFZRSJ = this.zjshyj.ZJNFFZRSJ
        data.LX = '竣工验收'
        if (this.zjshyj.ZJNFYJ && this.zjshyj.ZJNFFZR && this.zjshyj.ZJNFFZRSJ) {
        } else {
          status = false
        }
      }
      if (this.form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}') {
        // ;
        data = this.zjshyj
        dataGuid = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
        data.PKID = this.zjshyj.PKID
        data.ROW_GUID = this.zjshyj.ROW_GUID
        data.TO_ROW_GUID = this.form.ROW_GUID
        data.ZJYJ = this.zjshyj.ZJYJ
        data.ZJFZR = this.zjshyj.ZJFZR
        data.ZJSJ = this.zjshyj.ZJSJ
        data.LX = '竣工验收'
        // data.XCJSGHXKZH=this.inspectData.XCJSGHXKZH;
        // data.NCZJDPZSH=this.inspectData.NCZJDPZSH;
        // data.FYSQSJ=this.inspectData.FYSQSJ;
        // data.FYSQSJ=this.inspectData.JGYSSQSJ;
        // data.HOMESTEADAREA=this.inspectData.HOMESTEADAREA;
        // data.SYZJDMJ=this.inspectData.SYZJDMJ;
        // data.BUILDAREA=this.inspectData.BUILDAREA;
        // data.SJFJZDMJ=this.inspectData.SJFJZDMJ;
        // data.BUILDSTOREY=this.inspectData.BUILDSTOREY;
        // data.JGCS=this.inspectData.JGCS;
        // data.BUILDHEIGHT=this.inspectData.BUILDHEIGHT;
        // data.JGGD=this.inspectData.JGGD;
        // data.CJTH=this.inspectData.CJTH;
        // data.NFFM=this.NFFM;
        // data.NW=this.NW;
        if (this.zjshyj.ZJYJ && this.zjshyj.ZJFZR && this.zjshyj.ZJSJ) {
        } else {
          status = false
        }
        // let params = {
        //   dataGuid: '70efd06d-e17c-45bd-ab40-f7283f8bb4ef',
        //   strParams: JSON.stringify([this.inspectData]),
        //   token: window.localStorage.getItem('token')
        // }
        let params = {
          accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataguid: '70efd06d-e17c-45bd-ab40-f7283f8bb4ef',
            strParams: JSON.stringify([this.inspectData])
            // token: token,
          }
        }
        const res = await QuerySignCallback(params)
        if (JSON.parse(res.data.data).Success) {
          this.$toast.success('保存成功')
        }
        // this.JDDJARR = JSON.parse(res.data.data).Data
        // const res = await updateDataView(params)
      }
      if (this.form.WF_GUID == '{8FAD71FB-7756-4F0A-BEE8-4F6397B075A8}') {
        // let params = {
        //   dataGuid: '70efd06d-e17c-45bd-ab40-f7283f8bb4ef',
        //   strParams: JSON.stringify([this.inspectData]),
        //   token: window.localStorage.getItem('token')
        // }
        // const res = await updateDataView(params)
        let params = {
          accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataguid: '70efd06d-e17c-45bd-ab40-f7283f8bb4ef',
            strParams: JSON.stringify([this.inspectData])
            // token: token,
          }
        }
        const res = await QuerySignCallback(params)
      }
      // let params = {
      //   dataGuid: dataGuid,
      //   strParams: JSON.stringify([data]),
      //   token: window.localStorage.getItem('token')
      // }
      let params = {
        accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: dataGuid,
          strParams: JSON.stringify([data])
          // token: token,
        }
      }
      if (dataGuid == '145ea3e4-e103-4a4f-a7f7-bb5009ce5cf1') {
        if (Number(this.inspectData.ZDMJ) <= Number(this.surveyData.HOMESTEADAREA) && Number(this.inspectData.JZMJ) <= Number(this.surveyData.HOMESTEADAREA)) {
        } else {
          this.$toast.fail('放样房基占地面积或放样宅基地面积不能大于批准面积!')
          return false
        }
      }
      //获取传过来的数据wjh 2022-05-25  四到场三个镇街发送
      let iszjsh = ''
      let nodeguid = ''
      if (JSON.parse(this.$route.query.data)) {
        nodeguid = JSON.parse(this.$route.query.data).NODE_GUID
        if (nodeguid == '{646A4D45-00AC-4EA9-98AE-C5E704740BC1}' || nodeguid == '{D9C76DDF-7A07-4F5F-A9F2-FD597C715481}' || nodeguid == '{BFF3BE52-75D4-4C53-B5E9-9144E35E7617}') {
          //现场放样
          iszjsh = ''
        } else {
          iszjsh = 1
        }
      }

      if (status) {
        if (this.isAdd) {
          params.accessCode = '0fb3f6123d1b4fe6851c99532c463f6f'
          const res = await QuerySignCallback(params)
          let data = JSON.parse(res.data.data).Success
          // if (res.data.Success) {
          if (data) {
            if (!type) {
              this.$toast.success('保存成功!')
            } else {
              this.$router.push({
                path: '/TreeSelect1',
                query: { data: this.form, iszjsh: iszjsh }
              })
            }
          }
        } else {
          // const res = await updateDataView(params)
          const res = await QuerySignCallback(params)
          if (JSON.parse(res.data.data).Success) {
            if (!type) {
              this.$toast.success('保存成功!')
            } else {
              this.$router.push({
                path: '/TreeSelect1',
                query: { data: this.form, iszjsh: iszjsh }
              })
            }
          }
          // this.saveFormData()
        }
        //竣工验收保存意见
        if (this.form.WF_GUID == '{8FAD71FB-7756-4F0A-BEE8-4F6397B075A8}') {
          this.saveJGYSYJ(JSON.parse(params.params.strParams))
        }
      } else {
        this.$toast.fail('请输入必填项!')
      }
    },
    saveFormData: async function () {
      let dataGuid2 = ''
      switch (this.pageType) {
        case '现场放样':
          dataGuid2 = '145ea3e4-e103-4a4f-a7f7-bb5009ce5cf1'
          break
        case '基槽验线':
          dataGuid2 = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          break
        case '一层立模':
          dataGuid2 = 'de4ca6bb-1516-44e5-92ee-62071e571ea3'
          break
        case '竣工验收':
          dataGuid2 = '70efd06d-e17c-45bd-ab40-f7283f8bb4ef'
          break
        case '镇街审核':
          dataGuid2 = '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032'
          break
      }
      let searchObject2 = JSON.stringify([
        { field: 'to_row_guid', value: this.form.ROW_GUID, operator: '=' },
        { field: 'LX', value: this.pageType, operator: '=' }
      ])

      let token = window.localStorage.getItem('token')
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: dataGuid2,
          searchObject: searchObject2
          // token: token,
        }
      }
      const res2 = await QuerySignCallback(params)
      // const res2 = await dataServerOpenDataView(dataGuid2, searchObject2, token)
      if (JSON.parse(res2.data.data).Data.length > 0) {
        this.inspectData.IFTG = JSON.parse(res2.data.data).Data[0].IFTG_DICNAME
      }
    },
    //保存意见
    saveJGYSYJ: async function (data) {
      if (this.isAddYJ) {
        //没有保存
        let params = {
          accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataguid: '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032',
            strParams: JSON.stringify(data)
            // token: token,
          }
        }
        const res = await QuerySignCallback(params)
      } else {
        //保存了,则修改
        let params = {
          accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataguid: '8c2768a1-b9d0-47a3-b6fa-ca594bd4f032',
            strParams: JSON.stringify(data)
            // token: token,
          }
        }
        const res = await QuerySignCallback(params)
        if (JSON.parse(res.data.data).Success) {
          this.$toast.success('保存成功!')
        } else {
          this.$toast.fail('保存失败!')
        }
      }
    },
    //地图
    getDituUrl() {
      this.$router.push({
        path: '/mapContainer',
        query: {
          data: JSON.stringify(this.$route.query.data)
        }
      })
    },
    //
    //获取文件流
    async getFileUrls() {
      //吕川提供的接口
      let formData = new FormData()
      formData.append('accessCode', 'e4e59067424311eeacac6805cac0af68')
      formData.append('cityCode', window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000')
      formData.append(
        'params',
        JSON.stringify({
          groupGuid: '{9DAD7750-9499-4751-A9E5-84B2EB9D25D0}',
          dataGuid: 'a4951fe8-da8a-4264-87f2-a6fa6b9a1928',
          toRowGuid: me.form.ROW_GUID
        })
      )
      const res = await dataTransFile()
      let data1 = JSON.parse(res.data.data).FileList
    },
    async fileNode(item) {
      let me = this
      if (item.path == 'file') {
        dd.ready(function () {
          dd.openLink({
            url:
              'https://nfzjszlb.jst.zj.gov.cn/PrintServer/api/PreviewWordRpt?groupGuid=%7B9DAD7750-9499-4751-A9E5-84B2EB9D25D0%7D&toRowGuid=' +
              me.form.ROW_GUID +
              '&dataGuid=01103ebf-a884-4282-b996-78dd64196946'
          })
            .then((res) => {})
            .catch((err) => {
              window.open(
                'https://nfzjszlb.jst.zj.gov.cn/PrintServer/api/PreviewWordRpt?groupGuid=%7B9DAD7750-9499-4751-A9E5-84B2EB9D25D0%7D&toRowGuid=' +
                  me.form.ROW_GUID +
                  '&dataGuid=01103ebf-a884-4282-b996-78dd64196946'
              )
            })
        })
      } else {
        this.$router.push({
          path: '/' + item.path,
          query: {
            data: JSON.stringify(this.form),
            data1: JSON.stringify(this.form),
            number: '一层',
            type: 'SidaochangPage'
          }
        })
      }
    },
    pageTypefile() {
      switch (this.pageType) {
        case '现场放样':
          this.groupGuids = 'eaf00a19-63a3-466e-93cc-0b26cd031666'
          break
        case '基槽验线':
          this.groupGuids = 'f57c782d-c03a-47cf-a422-a465bb51bdf0'
          break
        case '一层立模':
          this.groupGuids = 'f57c782d-c03a-47cf-a422-a465bb51bdf0'
          break
        case '竣工验收':
          this.groupGuids = ['9396d4c6-5715-479e-800c-cfb5f4a40e82', 'bcd764be-fa78-43df-baf2-646a54244126']
          break
      }
    },
    newGuid(format) {
      //表示全局唯一标识符 (GUID)。
      function Guid(g) {
        var arr = new Array() //存放32位数值的数组
        if (typeof g == 'string') {
          //如果构造函数的参数为字符串
          InitByString(arr, g)
        } else {
          InitByOther(arr)
        }
        //返回 Guid 类的此实例值的 String 表示形式。
        this.ToString = function (format) {
          if (typeof format == 'string') {
            if (format == 'N' || format == 'D' || format == 'B' || format == 'P') {
              return ToStringWithFormat(arr, format)
            } else {
              return ToStringWithFormat(arr, 'D')
            }
          } else {
            return ToStringWithFormat(arr, 'D')
          }
        }

        //由字符串加载
        function InitByString(arr, g) {
          g = g.replace(/\{|\(|\)|\}|-/g, '')
          g = g.toLowerCase()
          if (g.length != 32 || g.search(/[^0-9,a-f]/i) != -1) {
            InitByOther(arr)
          } else {
            for (var i = 0; i < g.length; i++) {
              arr.push(g[i])
            }
          }
        }

        //由其他类型加载
        function InitByOther(arr) {
          // var i = 32;
          // while (i--) {
          //     arr.push("0");
          // }

          var i = 32
          while (i--) {
            arr.push(Math.floor(Math.random() * 16.0).toString(16))
          }
        }

        /*
                    根据所提供的格式说明符，返回此 Guid 实例值的 String 表示形式。
                    N  32 位： xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    D  由连字符分隔的 32 位数字 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                    B  括在大括号中、由连字符分隔的 32 位数字：{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
                    P  括在圆括号中、由连字符分隔的 32 位数字：(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
                    */

        //增加一个标识能区分开这个guid是不是由前端生成的
        function ToStringWithFormat(arr, format) {
          switch (format) {
            case 'N':
              return arr.toString().replace(/,/g, '')
            case 'D':
              var str = arr.slice(0, 8) + '-1203' + '-' + arr.slice(12, 16) + '-' + arr.slice(16, 20) + '-' + arr.slice(20, 32)
              str = str.replace(/,/g, '')
              return str
            case 'B':
              var str = ToStringWithFormat(arr, 'D')
              str = '{' + str + '}'
              return str
            case 'P':
              var str = ToStringWithFormat(arr, 'D')
              str = '(' + str + ')'
              return str
            default:
              return new Guid()
          }
        }

        return this.ToString()
      }

      var g = new Guid()
      return g.ToString(format)
    },
    getDate: function () {
      let dateTime
      let yy = new Date().getFullYear()
      let mm = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
      let dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
      let hh = new Date().getHours()
      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
      dateTime = yy + '-' + mm + '-' + dd
      // return dateTime
      this.inspectData.JCSJ = this.inspectData.JCSJ ? this.inspectData.JCSJ : dateTime
      if (this.form.NODE_GUID == '{5CC13346-8C53-4A37-989D-932716248754}') {
        //镇街资格意见经办人
        this.inspectData.ZJZGSHSJ = this.inspectData.ZJZGSHSJ ? this.inspectData.ZJZGSHSJ : dateTime
        this.zjshyj.ZJZGSHSJ = dateTime
      } else if (this.form.NODE_GUID == '{EB7D42FE-320C-4A0A-9C98-3E9373898826}') {
        //镇街资格意见负责人
        this.inspectData.ZJZGSHSJ2 = this.inspectData.ZJZGSHSJ2 ? this.inspectData.ZJZGSHSJ2 : dateTime
        this.zjshyj.ZJZGSHSJ2 = dateTime
      } else if (this.form.NODE_GUID == '{74864380-8590-4F8B-BD75-942E08F04D81}') {
        //镇街规划意见经办人
        this.inspectData.ZJGHSHSJ = this.inspectData.ZJGHSHSJ ? this.inspectData.ZJGHSHSJ : dateTime
        this.zjshyj.ZJGHSHSJ = dateTime
      } else if (this.form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}') {
        //镇街规划意见负责人
        this.inspectData.ZJGHSHSJ2 = this.inspectData.ZJGHSHSJ2 ? this.inspectData.ZJGHSHSJ2 : dateTime
        this.zjshyj.ZJGHSHSJ2 = dateTime
      } else if (this.form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}') {
        //镇街农房意见经办人
        this.inspectData.ZJNFSHSJ = this.inspectData.ZJNFSHSJ ? this.inspectData.ZJNFSHSJ : dateTime
        this.zjshyj.ZJNFSHSJ = dateTime
      } else if (this.form.NODE_GUID == '{B6D1F2A1-ACF3-4894-948E-54B9BC1F059F}') {
        //镇街农房意见负责人
        this.inspectData.ZJNFFZRSJ = this.inspectData.ZJNFFZRSJ ? this.inspectData.ZJNFFZRSJ : dateTime
        this.zjshyj.ZJNFFZRSJ = dateTime
      } else if (this.form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}') {
        this.zjshyj.ZJSJ = dateTime
      }
    },
    getUserName() {
      let userName = JSON.parse(window.localStorage.getItem('userName')).userName
      this.inspectData.JCRY = this.inspectData.JCRY ? this.inspectData.JCRY : userName
      if (this.form.NODE_GUID == '{5CC13346-8C53-4A37-989D-932716248754}') {
        //镇街资格意见经办人
        this.inspectData.ZJZGSHR = this.inspectData.ZJZGSHR ? this.inspectData.ZJZGSHR : userName
        this.zjshyj.ZJZGSHR = userName
      } else if (this.form.NODE_GUID == '{EB7D42FE-320C-4A0A-9C98-3E9373898826}') {
        //镇街资格意见负责人
        this.inspectData.ZJZGSHR2 = this.inspectData.ZJZGSHR2 ? this.inspectData.ZJZGSHR2 : userName
        this.zjshyj.ZJZGSHR2 = userName
      } else if (this.form.NODE_GUID == '{74864380-8590-4F8B-BD75-942E08F04D81}') {
        //镇街规划意见经办人
        this.inspectData.ZJGHSHR = this.inspectData.ZJGHSHR ? this.inspectData.ZJGHSHR : userName
        this.zjshyj.ZJGHSHR = userName
      } else if (this.form.NODE_GUID == '{003E7696-65E6-432B-97A7-C95711D1D0E0}') {
        //镇街规划意见负责人
        this.inspectData.ZJGHFZR = this.inspectData.ZJGHFZR ? this.inspectData.ZJGHFZR : userName
        this.zjshyj.ZJGHFZR = userName
      } else if (this.form.NODE_GUID == '{7C289E35-88FC-4002-9B88-ED6F472CA872}') {
        //镇街农房意见经办人
        this.inspectData.ZJNFSHR = this.inspectData.ZJNFSHR ? this.inspectData.ZJNFSHR : userName
        this.zjshyj.ZJNFSHR = userName
      } else if (this.form.NODE_GUID == '{B6D1F2A1-ACF3-4894-948E-54B9BC1F059F}') {
        //镇街农房意见负责人
        this.inspectData.ZJNFFZR = this.inspectData.ZJNFFZR ? this.inspectData.ZJNFFZR : userName
        this.zjshyj.ZJNFFZR = userName
      } else if (this.form.NODE_GUID == '{41EE42C1-2F52-45C5-A05C-D2D3160DCE23}') {
        this.zjshyj.ZJFZR = userName
      }
    },
    //判断结构显示那个
    getDataJG: async function () {
      let ghjbrex = {
        procName: 'up_query',
        dtParams: JSON.stringify([{ I_USERID: "'" + this.form.ROW_GUID + "'", I_TYPE: 15 }]),
        token: window.localStorage.getItem('token')
      }
      let ghjbrfu = {
        accessCode: '69db6bece3a7480592e2ec753d1e335e',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: ghjbrex
      }
      const resghjbrbe = await FileServerProxy(ghjbrfu)
      let resData = JSON.parse(resghjbrbe.data.data)
      if (resData.Data && resData.Data.length > 0) {
        if (resData.Data[0].STRUCTURETYPE == 42) {
          //现浇混泥土
          this.list.forEach((item, index) => {
            if (item.index == '3') {
              item.state = false
            }
          })
        } else {
          //砖砌墙
          this.list.forEach((item, index) => {
            if (item.index == '4') {
              item.state = false
            }
          })
        }
      }
    },
    //判断脚手架是否填写（扣件式）
    getDataIsSaveKJSJSJ: async function () {
      let ghjbrexKJS = {
        procName: 'up_query',
        dtParams: JSON.stringify([{ I_USERID: "'" + this.form.ROW_GUID + "'", I_TYPE: 18 }]),
        token: window.localStorage.getItem('token')
      }
      let ghjbrfuKJS = {
        accessCode: '69db6bece3a7480592e2ec753d1e335e',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: ghjbrexKJS
      }
      const resghjbrbeKJS = await FileServerProxy(ghjbrfuKJS)
      let resDataKJS = JSON.parse(resghjbrbeKJS.data.data)
      if (resDataKJS.Data && resDataKJS.Data.length > 0) {
        if (resDataKJS.Data[0].DATA1 != 0) {
          //没保存
          this.list.forEach((item, index) => {
            if (item.index == '2') {
              item.state = false
            }
          })
        }
      }
    },
    //判断脚手架是否填写（竹脚手架）
    getDataIsSaveZJSJ: async function () {
      let ghjbrexZJS = {
        procName: 'up_query',
        dtParams: JSON.stringify([{ I_USERID: "'" + this.form.ROW_GUID + "'", I_TYPE: 19 }]),
        token: window.localStorage.getItem('token')
      }
      let ghjbrfuZJS = {
        accessCode: '69db6bece3a7480592e2ec753d1e335e',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: ghjbrexZJS
      }
      const resghjbrbeZJS = await FileServerProxy(ghjbrfuZJS)
      let resDataZJS = JSON.parse(resghjbrbeZJS.data.data)
      if (resDataZJS.Data && resDataZJS.Data.length > 0) {
        if (resDataZJS.Data[0].DATA2 != 0) {
          //没保存
          this.list.forEach((item, index) => {
            if (item.index == '1') {
              item.state = false
            }
          })
        }
      }
    }
  },
  mounted() {
    this.getSelectData()
    this.form = JSON.parse(this.$route.query.data)
    this.getIFSILINGYIJIAN()
    this.pageType = this.$route.query.type
    this.rowGuid = this.newGuid()
    // this.list.forEach((item, index) => {
    //   if (this.form.STRUCTURETYPE == "42" && index === 4) {
    //   }
    // });
    this.pageTypefile()
    this.getFile()
    this.getData()
    this.getEnum('db35edee-88e0-4fae-b14a-868ed4beb1d9')
    this.getEnum('52215e71-341a-452b-8823-a8d4aae058ab')
    this.getEnum('d2ec96d4-b5bc-404a-a9f1-34db915c694b')
    this.getEnum('b65d1943-66f4-49b1-b759-cd9f079dc0d3')
    this.getEnum('f7f359ad-369c-4bf4-892c-294dceb5edef')
    this.getEnum('d47fc1d9-c756-4a46-8259-7e65c82f26ba')
    this.getEnum('713a5af9-1405-4ba1-9c51-e41d080886f4')
    this.getEnum('a892e0f4-5fd6-42b4-b6c2-6e1fc5ebb5dc')
    this.getDataJG()
    this.getDataIsSaveKJSJSJ()
    this.getDataIsSaveZJSJ()
    // this.getTJData()
  },
  components: {
    FileData,
    upLoad
  }
}
</script>

<style scoped lang="scss">
#SidaochangPage {
  height: 95vh;
  overflow: auto;

  .title {
    width: 100%;
    height: 50px;
    line-height: 50px;
    font-size: 20px;
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #9b9b9b;
    padding-left: 10px;

    .line {
      width: 6px;
      height: 26px;
      background: #3f8ffc;
      display: inline-block;
      margin-right: 10px;
    }
  }

  .tabList {
    padding: 10px;
    font-size: 14px;
    line-height: 30px;
    color: #3f8ffc;
    text-decoration: underline;
  }

  .inputWrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #ebedf0;
    padding: 0 16px;

    span {
      margin-right: 5px;
    }

    .van-cell {
      padding: 10px 0 !important;
    }
  }

  .bottom {
    padding: 10px;
    text-align: center;
  }
}
</style>
<style lang="scss">
#SidaochangPage {
  .van-field__control {
    text-align: right !important;
  }

  .van-field__label {
    font-weight: bold;
    // width: 10.2em !important;
    width: auto !important;
  }

  .inputWrap {
    .van-cell {
      padding: 10px 0 !important;
    }
  }
}
</style>
